package com.example.myapplication.widgets.pickerview.date_time;

import com.example.myapplication.widgets.pickerview.base.TipPickerBean;

/**
 * Created by chasing on 2020/10/29.
 */
public class DateTimePickerBean implements TipPickerBean {
    private String mDate;
    private String mDayOfWeekStr;
    private int mYear;
    private int mMonth;
    private int mDay;
    private int mDayOfWeek;
    private int mTextSpace;// 周--日期之间的间距

    public DateTimePickerBean setTextSpace(int textSpace){
        mTextSpace = textSpace;
        return this;
    }

    public String getDate() {
        if (mDate == null) return "";
        return mDate;
    }

    public DateTimePickerBean setDate(String date) {
        mDate = date;
        return this;
    }

    public int getYear() {
        return mYear;
    }

    public DateTimePickerBean setYear(int year) {
        mYear = year;
        return this;
    }

    public int getMonth() {
        return mMonth;
    }

    public DateTimePickerBean setMonth(int month) {
        mMonth = month;
        return this;
    }

    public int getDay() {
        return mDay;
    }

    public DateTimePickerBean setDay(int day) {
        mDay = day;
        return this;
    }

    public int getDayOfWeek() {
        return mDayOfWeek;
    }

    public DateTimePickerBean setDayOfWeek(int dayOfWeek) {
        mDayOfWeek = dayOfWeek;
        return this;
    }

    public DateTimePickerBean setDayOfWeekStr(String dayOfWeekStr) {
        mDayOfWeekStr = dayOfWeekStr;
        return this;
    }

    @Override
    public String getText() {
        return mDate;
    }

    @Override
    public String getTipText() {
        return mDayOfWeekStr;
    }

    @Override
    public int getTipMargin() {
        return mTextSpace;
    }
}
